Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add indexOf and lastIndexOf to DynamicArrayLib #1096

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

Vectorized
Copy link
Owner

Description

For left-curved coding QoL.

Solidity is technically syntax sugar for bytecode anyways.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

  • Ran forge fmt?
  • Ran forge test?

Pull requests with an incomplete checklist will be thrown out.

Copy link

github-actions bot commented Sep 30, 2024

Gas Snapshot Comparison Report

Generated at commit : 7d0f214, Compared to commit : d417334

Contract Name Test Name Main Gas PR Gas Diff
DynamicArrayLibTest testDynamicArrayPushAfterReserve() 40001 39957 -44
testDynamicArrayPushAndPop() 66674 66697 23
testDynamicArraySlice() 11086 11632 546
testUint256ArrayPopulate() 17057 17080 23
test__codesize() 8362 10759 2397
testUint256ArrayIndexOf() - 17973 -
testUint256ArrayLastIndexOf() - 24238 -
testUint256Contains() - 18300 -

src/utils/DynamicArrayLib.sol Outdated Show resolved Hide resolved
src/utils/DynamicArrayLib.sol Outdated Show resolved Hide resolved
src/utils/DynamicArrayLib.sol Outdated Show resolved Hide resolved
src/utils/DynamicArrayLib.sol Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants